package com.quiz.bis.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.quiz.common.core.domain.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 组卷策略
 *
 * @author ahuan
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("paper_strategies")
public class PaperStrategy extends BaseModel {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("description")
    private String description;

    @TableField("strategy_type")
    private Integer strategyType;

    @TableField("difficulty_config")
    private String difficultyConfig;

    @TableField("knowledge_config")
    private String knowledgeConfig;

    @TableField(exist = false)
    private String knowledgeNameConfig;

    @TableField("question_config")
    private String questionConfig;

    @TableField("template_id")
    private Long templateId;

    @TableField("usage_count")
    private Integer usageCount;

    @TableField("create_by_name")
    private String createByName;

    @TableField("population_size")
    private Integer populationSize;

    @TableField("max_generations")
    private Integer maxGenerations;

    @TableField("mutation_rate")
    private BigDecimal mutationRate;

    @TableField("crossover_rate")
    private BigDecimal crossoverRate;

    @TableField("fitness_threshold")
    private BigDecimal fitnessThreshold;

    @TableField("time_limit")
    private Integer timeLimit;

    @TableField("diversity_threshold")
    private BigDecimal diversityThreshold;
}